package cuiyt.juc.unsafe.collection;

import java.util.HashSet;

/**
 * @author cyt
 * @create 2020-08-31 19:31
 */
public class SetTest {
    public static void main(String[] args) {
        HashSet<Integer> set = new HashSet<>();
        for (int i = 0; i < 10; i++) {
            set.add(i);
        }

        for (Integer integer : set) {
            System.out.println(integer);
        }

//        for (Iterator<Integer> iterator = set.iterator(); iterator.hasNext(); ) {
//            System.out.println(iterator.next());
//        }
    }

}
